home *** CD-ROM | disk | FTP | other *** search
/ Canadian Geographic Explorer / Canadian Geographic Explorer.iso / pc / riddler.dxr / 00039_Play Again Init Script.ls < prev    next >
Encoding:
Text File  |  1996-10-03  |  884 b   |  31 lines

  1. on exitFrame
  2.   global gPACounter, gVoiceChannel, gPathToSound, fileDelimiter, gLimit, gMusicChannel
  3.   if not soundBusy(gMusicChannel) then
  4.     sound playFile gMusicChannel, gPathToSound & "music" & fileDelimiter & "playagan.aif"
  5.   end if
  6. end
  7.  
  8. on keyDown
  9.   global gMusicChannel
  10.   set jKey to the keyPressed
  11.   if jKey = "y" then
  12.     repeat while the volume of sound gMusicChannel > 0
  13.       set the volume of sound gMusicChannel to the volume of sound gMusicChannel - 16
  14.       updateStage()
  15.       LingoPause(5)
  16.     end repeat
  17.     sound stop gMusicChannel
  18.     go("Num Of Players")
  19.   else
  20.     if jKey = "n" then
  21.       repeat while the volume of sound gMusicChannel > 0
  22.         set the volume of sound gMusicChannel to the volume of sound gMusicChannel - 16
  23.         updateStage()
  24.         LingoPause(5)
  25.       end repeat
  26.       sound stop gMusicChannel
  27.       go("End")
  28.     end if
  29.   end if
  30. end
  31.